package com.fjec.wx.schedule;

import com.fjec.wx.schedule.handler.AccessTokenHandler;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class WxSchedule {

    @Resource
    private AccessTokenHandler accessTokenHandler;

    @XxlJob("accessTokenHandler")
    public ReturnT<String> accessTokenHandler(String param) {
        String log = accessTokenHandler.handle();
        ReturnT<String> returnT = ReturnT.SUCCESS;
        returnT.setMsg(log);
        returnT.setContent("accessTokenMaintainer");
        return returnT;
    }

}
